In photography, depending on the distance of different objects in a scene from the camera, some of the objects might appear in focus, while other objects appear out of focus or blur. This is due to the fact that in most vision systems, each image is captured with a particular “focal length.” The “focal length” refers to a distance extending radially from the camera into the scene of the image. Any object in the image that is located exactly at the focal length appears perfectly in focus. On the other hand, any object that is not located at the focal length (e.g., closer to or farther away from the camera) appears blurry and out of focus. Different objects in any given scene may be located at different distances from the camera, therefore, it is likely that only some of the objects are located at perfect focus. Consequently, for a typical image captured by a visual system, some objects appear in focus in the image, while other objects appear out of focus.
Even though human vision systems generate images with similar characteristics, e.g., in any given image, only objects located at the focal length are in focus while other objects are blurry, humans are adapted to quickly scanning a scene, focusing on different objects, and obtaining a useful “composite” visual conception of the physical surroundings. That is how we “see” the world. However, when we look at captured images, e.g., an image on a display device, the same natural scanning and re-focusing generally is not available. Instead, we are often looking at a static image at any given time, with certain objects being in focus in the image, and certain other objects being blurry or out of focus in the image. To address these shortcomings, the present disclosure presents embodiments for realizing two different approaches to viewing images. One approach involves generating an “all-in-focus” image in which all objects are in focus. Another approach involves providing a “refocus” capability by which a user can select a portion of the image and bring it into focus.